import os
import pytest

import sys
import io

# 强制设置标准流的编码
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
os.system("chcp 65001")  # 仅限 Windows



if __name__ == "__main__":
    pytest.main(["-vs", "./tests/test_login.py", "--alluredir", "./report/json_report", "--clean-alluredir"])
    os.system("allure generate ./report/json_report -o ./report/html_report --clean --lang zh")
    # 发送消息
    # send_message()